import {request} from './requests'

export function getCartList() {
    return request({
        url: 'carts',
        method: 'get'
    })
}

export function getSelectStatus(url) {
    return request({
        url: url,
        method: 'put'
    })
}

export function updateCartStatus(id, quantity, selected) {
    // console.log(id, quantity, selected);
    return request({
        url: '/carts/' + id,
        method: 'put',
        data: {
            quantity,
            selected
        }
    })
}

export function deleteProduct(id) {
    return request({
        url: '/carts/' +id,
        method: 'delete'
    })
}
